<!DOCTYPE html>
<html>
<#include "../head.html">
    <body class="full">
    <div class="mc">
        <div>
            <div class="mc-l">
                <!--左侧导航---{-->
                <div id="navPanelContainer">
                    <div class="system-logo cd"></div>
                    <!--管理员信息---{-->
                    <#include "../adminInfo.html">
                        <!--管理员信息---}-->
                        <div class="nav-wrap">
                            <#include "left.html">
                        </div>
                </div>
                <!--左侧导航---}-->
            </div>
            <div class="mc-m">
                <div class="navToggle"></div>
            </div>
            <div class="mc-r">
                <!--顶部导航---{-->
                <#include "../topNav.html">
                    <!--顶部导航---}-->

                    <!--面包屑导航---{-->
                    <#assign moduleName="阶梯奖励">
                        <#include "banner.html">
                            <!--面包屑导航---}-->

                            <!--工具栏--{-->
                            <div id="toolbar" class="clearfix">
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <input type="button" id="calculate" value="计算奖励" class="input-button export-btn"/>
                                    </div>
                                    <#if auth_user??&&auth_user.userType.typeId == 1>
                                        <div class="toolbor-module export">
                                            <input type="button" id="repair" value="修复奖励" class="input-button export-btn"/>
                                        </div>
                                    </#if>
                                </div>
                                <div class="s_toolTop">
                                    <div class="toolbor-module export">
                                        <div class="formTit">月份：</div>
                                        <input type="text" name="startMonth" id="startMonth" value="" class="search-value">
                                        <div class="formTit"> 到 </div>
                                        <input type="text" name="endMonth" id="endMonth" value="" class="search-value">
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">用户名：</div>
                                        <input type="text" name="username" id="username" value="请输入用户名" class="search-value">
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">联系电话：</div>
                                        <input type="text" name="phone" id="phone" value="请输入手机" class="search-value">
                                    </div>
                                    <div class="toolbor-module export">
                                        <div class="formTit">奖励金额：</div>
                                        <input class="_search-value" name="minAward" id="minAward" value=""/>
                                        <div class="formTit"> 到 </div>
                                        <input class="_search-value" name="maxAward" id="maxAward" value=""/>
                                    </div>
                                    <div class="toolbor-module search">
                                        <input type="button" value="搜索"  class="input-button" onclick="sousuo();">
                                    </div>
                                </div>
                            </div>
                            <!--工具栏--}-->

                            <div id="main" class="clearfix">
                                <form action="" method="post">
                                    <table class="data-list">
                                        <tr class="header">
                                            <td>ID</td>
                                            <td>月份</td>
                                            <td>用户名</td>
                                            <td>真实姓名</td>
                                            <td>联系电话</td>
                                            <td>实际投资总额</td>
                                            <td>奖励梯度</td>
                                            <td>额外奖励金额</td>
                                            <td>理财经理</td>
                                            <td>奖励是否发放</td>
                                        </tr>
                                       <#if list??>
                                       <#list list as item>
                                        <tr class="s">
                                           	 <td>${item.id?c}</td>
		                                     <td>${item.year?c}.${item.month?c}</td>
		                                     <td><a href="/admin/operate/viewUserLadderAward.html?userId=${item.userId?c}&year=${item.year?c}&month=${item.month?c}">${item.userName!''}</a></td>
		                                     <td>${item.realName!''}</td>
		                                     <td>${item.phone!''}</td>
		                                     <td>${item.convertedMoney!0}元</td>
		                                     <td>${(item.percent!0)*100}%</td>
		                                     <td>${item.award!0}元</td>
		                                     <td><@wealthManager id="${item.userId?c}"></@wealthManager></td>
		                                     <td>
		                                     <#if item.sendFlag ==1 >
		                                    	 已发放
		                                    <#elseif item.sendFlag ==2>
		                                    	支付处理中
		                                     <#else>
		                                     	<a class="js_send" href="/admin/operate/sendAward.html?id=${item.id?c}"  style="color:#0099ff">未发放</a>
		                                     </#if>
		                                     </td>
                                        </tr>
                                        </#list>
										</#if>
                                    </table>
                                </form>

                                <!--底部工具栏--{-->
                                <div id="bottomToolbar" class="clearfix">
                                    <div class="other-tool">
                                        <dl class="refresh-data">
                                            <dt class="refresh-data-icon"></dt>
                                            <dd><a href="javascript:void(0);" class="refresh-page">刷新数据</a></dd>
                                        </dl>
                                    </div>

                                    <!--翻页系统--{-->
                                     <div class="container s_formPage">
                                        <#import "../../common/page.html" as pager>
                                            <@pager.pagination page=page url="${pageUrl}" map=param style="style1" />
                                    </div>
                                    <!--翻页系统--}-->
                                </div>
                                <!--底部工具栏--}-->

                                
                            </div>

            </div>
        </div>
        <div>
            <!--尾部--{-->
            <td colspan="3" class="mc-b"><#include "../foot.html"></td>
            <!--尾部--}-->
        </div>
    </div>

    </body>
    						<script>
    						
                                    var url = 'userLadderAward.html?search=true';
                                    function sousuo(){
                                    	 var sou = "";
                                         var username = $("#username").val();
                                         if (username!=null&&username!=""&&username!="undefine"&&username!="请输入用户名"){
                                             sou += "&username="+username;
                                         }
                                         
                                         var phone = $("#phone").val();
                                         if (phone!=null&&phone!=""&&phone!="undefine"&&phone!="请输入手机"){
                                             sou += "&phone="+phone;
                                         }
                                         
                                         var minAward = $("#minAward").val();
                     					 if(minAward!=""){
                     						sou += "&minAward="+minAward;
                     					 }
                                         var maxAward = $("#maxAward").val();
                     					 if(maxAward!=""){
                     						sou += "&maxAward="+maxAward;
                     					 }
                     					 
                     					 var startMonth = $("#startMonth").val();
                       					 if(startMonth!=""){
                       						sou += "&startMonth="+startMonth;
                       					 }
                                         var endMonth = $("#endMonth").val();
                       					 if(endMonth!=""){
                       						sou += "&endMonth="+endMonth;
                       					 }
                                         if (sou!=""){
                                             location.href=url+sou;
                                         }
                                    }
                                
                                    $(".js_send").click(function(){
                                		if(confirm("是否确认发放金额？")){
                                			return true;
                                		}else{
                                			return false;
                                		}
                                	});
                                    
                                    
                                    $("#calculate").click(function(){
                                    	location.href = "calculateAward.html";
                                    });
                                    
                                    $("#repair").click(function(){
                                    	location.href = "repairAward.html";
                                    });
                                </script>
</html>
<#include "../jsPage.html">
